package net.wofly.right.util;

/**
 * 功能模块
 * @author lign
 * @version 1.0
 * @created 30-十二月-2017 12:02:46
 */
public enum FuncModule {
	权限("right", "权限"),
	商品("commodity", "商品"),
	库存("store", "库存"),
	工作流("workflow", "工作流"),
	活动("activity", "活动"),
	签到("signin", "签到"),
	销售("sale", "销售"),
	酒店("restaurant", "酒店");

	private String enName;
	private String cnName;

	FuncModule(String enName, String cnName) {
		this.enName = enName;
		this.cnName = cnName;
	}

	public static boolean isValueCorrect(String enName) {
		for (FuncModule forEnum : values()) {
			if (forEnum.enName.equals(enName)) {
				return true;
			}
		}
		return false;
	}

	public static String getName(String enName) {
		for (FuncModule forEnum : values()) {
			if (forEnum.enName.equals(enName)) {
				return forEnum.cnName;
			}
		}
		return null;
	}

	public String getEnName() {
		return enName;
	}

	public void setEnName(String enName) {
		this.enName = enName;
	}

	public String getCnName() {
		return cnName;
	}

	public void setCnName(String cnName) {
		this.cnName = cnName;
	}
}